Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cherry-picked 2.0.1] Fix path-like object support in FFmpeg dispatcher #3243

Closed
wants to merge 1 commit into from

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Apr 5, 2023

In dispatcher mode, FFmpeg backend does not handle path-like object,
and C++ implementation raises an error.

This commit fixes it by normalizing path-like object to string.

@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mthrok mthrok mentioned this pull request Apr 5, 2023
@mthrok mthrok changed the title Fix file-like object support in FFmpeg dispatcher Fix path-like object support in FFmpeg dispatcher Apr 5, 2023
@mthrok mthrok requested review from hwangjeff and a team April 5, 2023 18:55
In dispatcher mode, FFmpeg backend does not handle path-like object,
and C++ implementation raises an error.

This commit fixes it by normalizing path-like object to string.
@mthrok mthrok force-pushed the fix-ffmpeg-dispatcher branch from d4fee19 to 81e78ba Compare April 5, 2023 20:06
@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mthrok merged this pull request in d69e885.

@github-actions
Copy link

github-actions bot commented Apr 5, 2023

Hey @mthrok.
You merged this PR, but labels were not properly added. Please add a primary and secondary label (See https://github.com/pytorch/audio/blob/main/.github/process_commit.py)

@mthrok mthrok deleted the fix-ffmpeg-dispatcher branch April 6, 2023 00:18
mthrok added a commit to mthrok/audio that referenced this pull request Apr 6, 2023
Summary:
In dispatcher mode, FFmpeg backend does not handle file-like object, and C++ implementation raises an issue.

This commit fixes it by normalizing file-like object to string.

Pull Request resolved: pytorch#3243

Reviewed By: nateanl

Differential Revision: D44719280

Pulled By: mthrok

fbshipit-source-id: 9dae459e2a5fb4992b4ef53fe4829fe8c35b2edd
@mthrok mthrok changed the title Fix path-like object support in FFmpeg dispatcher [Cherry-picked 2.0.1] Fix path-like object support in FFmpeg dispatcher Apr 6, 2023
mthrok added a commit to mthrok/audio that referenced this pull request Apr 6, 2023
Follow up of pytorch#3243. Save compat module had different semantics than info and load,
which requires different way of performing path normalization.
@mthrok mthrok changed the title [Cherry-picked 2.0.1] Fix path-like object support in FFmpeg dispatcher Fix path-like object support in FFmpeg dispatcher Apr 6, 2023
mthrok added a commit to mthrok/audio that referenced this pull request Apr 6, 2023
Follow up of pytorch#3243. Save compat module had different semantics than info and load,
which requires different way of performing path normalization.
facebook-github-bot pushed a commit that referenced this pull request Apr 7, 2023
Summary:
Follow up of #3243. Save compat module had different semantics than info and load, which requires different way of performing path normalization.

Pull Request resolved: #3248

Reviewed By: hwangjeff

Differential Revision: D44774997

Pulled By: mthrok

fbshipit-source-id: 4b967ae3ca6b45850d455b8e95aaa31762c5457e
mthrok added a commit to mthrok/audio that referenced this pull request Apr 7, 2023
…#3248)

Summary:
Follow up of pytorch#3243. Save compat module had different semantics than info and load, which requires different way of performing path normalization.

Pull Request resolved: pytorch#3248

Reviewed By: hwangjeff

Differential Revision: D44774997

Pulled By: mthrok

fbshipit-source-id: 4b967ae3ca6b45850d455b8e95aaa31762c5457e
mthrok added a commit that referenced this pull request Apr 7, 2023
#3248) (#3245)

* Fix path-like object support in FFmpeg dispatcher (#3243)

Summary:
In dispatcher mode, FFmpeg backend does not handle file-like object, and C++ implementation raises an issue.

This commit fixes it by normalizing file-like object to string.

Pull Request resolved: #3243

Reviewed By: nateanl

Differential Revision: D44719280

Pulled By: mthrok

fbshipit-source-id: 9dae459e2a5fb4992b4ef53fe4829fe8c35b2edd

* Fix path normalization for StreamWriter-based save operation (#3248)

Summary:
Follow up of #3243. Save compat module had different semantics than info and load, which requires different way of performing path normalization.

Pull Request resolved: #3248

Reviewed By: hwangjeff

Differential Revision: D44774997

Pulled By: mthrok

fbshipit-source-id: 4b967ae3ca6b45850d455b8e95aaa31762c5457e
@mthrok mthrok changed the title Fix path-like object support in FFmpeg dispatcher [Cherry-picked 2.0.1] Fix path-like object support in FFmpeg dispatcher Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants